package edu.rit.teamrocket.controller;

import edu.rit.teamrocket.model.DailyLog;
import edu.rit.teamrocket.model.Date;
import edu.rit.teamrocket.model.Food;
import edu.rit.teamrocket.model.FoodCollection;
import edu.rit.teamrocket.model.LogCollection;
import edu.rit.teamrocket.model.Recipe;

public class FoodController
{
	public LogCollection logs;
	public FoodCollection foods;
	
	public FoodController(){
		logs = new LogCollection();
		foods = new FoodCollection();
	}
	
	public LogCollection getLogs()
	{
		return logs;
	}
	
	public FoodCollection getFoods()
	{
		return foods;
	}
	
	public void setLogs(LogCollection logs)
	{
		this.logs = logs;
	}
	
	public void setFoods(FoodCollection foods)
	{
		this.foods = foods;
	}
	
	public void addFood(String name, int calories, double fatPercentage, double carbPercentage, double proteinPercentage)
	{
		foods.addFood(new Food(name, calories, fatPercentage, carbPercentage, proteinPercentage));
	}
	
	public void addRecipe()
	{
		foods.addFood(new Recipe());
	}
	
	public void addLog(double weight, int d, int m, int y)
	{
		logs.addLog(new DailyLog(weight, new Date(d,m,y)));
	}
}
